<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>指导站</title>
		<meta name="Author" content="余光cc" /> 
        <meta name="Copyright" content="网站版权" /> 
        <meta name="keywords" content="网站关键字" />
        <meta name="description" content="网站描述" />
        <link rel="Shortcut Icon" href="网站.ico图标路径" />
		<link rel="stylesheet" type="text/css" href="css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="css/guidance.css"/>
		<link rel="stylesheet" type="text/css" href="layui/css/layui.css"/>
	</head>
	<body>
	<div class="box" style="background: url(images/survey.png) no-repeat;">
		<div class="box-back">
			返回
		</div>
		<div class="box-top"></div>
		<!--<div class="box-bottom">
			<div class="box-bottom-left" >
				<h3>工作职责</h3>
				<div class="box-b-cont">
					<p></p>
				</div>
			</div>
			<div class="box-bottom-right">
				<h3>工作计划</h3>
				<div class="box-b-cont">
					
				</div>
			</div>
		</div>-->
	</div>
	<script src="js/jquery-3.3.1-min.js" type="text/javascript" charset="utf-8"></script>
	<script src="layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/echarts.common.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$('.box-back').on('click',function(){
			window.history.go(-1);
		})
		$.ajax({
			type:"post",
			url:"http://www.shopyun.top:8011/dp/api/branchList",
			async:true,
			success:function(data){
				var str = '';
				$.each(data, function(i,v) {
					str += '<div class="box-top-item">';
					str += '<h3 data-id="'+v.id+'">·&nbsp;'+v.name+'&nbsp;·</h3>';
					str += '<ul>';
					$.each(v.child, function(ii,vv) {
						str += '<li data-id="'+vv.id+'" data-pid="'+vv.p_id+'"><p>·&nbsp;'+vv.name+'&nbsp;·</p></li>';
					});
					str += '</ul>';
					str += '</div>';
				});
				$('.box-top').append(str);
				$('.box-top-item h3').unbind().on('click',function(){
					var id = $(this).attr('data-id');
					layer.open({
				      type: 2,
				      title: '工作职责详情',
				      shadeClose: true,
				      shade: false,
				      maxmin: false, //开启最大化最小化按钮
				      area: ['765px', '582px'],
				      content: 'gzzz.html?id=' + id
				    });
				})
				$('.box-top-item li').unbind().on('click',function(){
					var id = $(this).attr('data-id');
					var pid = $(this).attr('data-pid');
					layer.open({
				      type: 2,
				      title: '工作计划详情',
				      shadeClose: true,
				      shade: false,
				      maxmin: false, //开启最大化最小化按钮
				      area: ['765px', '582px'],
				      content: 'gzjh.html?id=' + id +'&pid=' + pid
				    });
				})
			}
		});
	</script>
	 
	</body>
</html>
